'use strict';
const db = uniCloud.database()
exports.main = async (event, context) => {
	const {
		result
	} = await uniCloud.callFunction({
		name: "user_query",
		data: {
			mobile: event.mobile
		}
	})

	if (result.code == -1) {
		return result
	}
	if (result.code == 100 && result.data.password != event.password) {
		return {
			code: -1,
			mes: "密码错误"
		}
	} else {
		return {
			code: 100,
			mes: "登录成功"
		}
	}
};